/* --- 1. VARIJABLE I RESET --- */
:root {
    --primary: #6366f1;
    --secondary: #ec4899;
    --accent: #a855f7;
    --bg-dark: #050505;
    --bg-card: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --font-main: 'Space Grotesk', sans-serif;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- 2. POZADINSKI EFEKTI --- */
.bg-grid {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px; z-index: -1;
}

.bg-glow {
    position: fixed; width: 600px; height: 600px; filter: blur(140px);
    border-radius: 50%; z-index: -1; opacity: 0.15; pointer-events: none;
}
.blob-1 { top: -10%; left: -10%; background: var(--primary); }
.blob-2 { bottom: -10%; right: -10%; background: var(--secondary); }

/* --- 3. KURSOR --- */
.cursor-dot, .cursor-outline {
    position: fixed; top: 0; left: 0; border-radius: 50%;
    pointer-events: none; z-index: 10000; transform: translate(-50%, -50%);
}
.cursor-dot { width: 8px; height: 8px; background: #fff; }
.cursor-outline { width: 40px; height: 40px; border: 2px solid rgba(255,255,255,0.3); transition: 0.1s; }

/* --- 4. NAVIGACIJA --- */
.navbar {
    position: fixed; width: 100%; top: 0; padding: 1.5rem 0; z-index: 1000;
    background: rgba(5, 5, 5, 0.4); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1300px; margin: 0 auto; display: flex;
    justify-content: space-between; align-items: center; padding: 0 5%;
}

.logo { display: flex; align-items: center; text-decoration: none; color: #fff; gap: 12px; }
.logo-slika { height: 45px; width: 45px; border-radius: 50%; box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }
.logo-text { font-size: 1.4rem; font-weight: 700; letter-spacing: -1px; }
.logo-text span { color: var(--primary); }

.nav-links a { text-decoration: none; color: #fff; font-size: 0.9rem; font-weight: 500; margin-left: 2.5rem; transition: 0.3s; }
.nav-cta { background: var(--primary); padding: 0.7rem 1.5rem; border-radius: 50px; }
.nav-cta:hover { background: var(--accent); box-shadow: 0 0 20px var(--primary); }

/* --- 5. HERO --- */
.hero { height: 100vh; display: flex; align-items: center; padding: 0 8%; }
.hero-content { max-width: 900px; }
.hero-title { font-size: clamp(3rem, 7vw, 6rem); line-height: 1; margin-bottom: 2rem; }
.gradient-text { background: linear-gradient(to right, #6366f1, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin-bottom: 3.5rem; }

.btn-primary { background: #fff; color: #000; padding: 1.2rem 3rem; border-radius: 50px; font-weight: 700; text-decoration: none; display: inline-block; transition: 0.3s; margin-right: 1.5rem; }
.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(255,255,255,0.3); }
.btn-secondary { color: #fff; text-decoration: none; font-weight: 600; border-bottom: 2px solid var(--primary); padding-bottom: 5px; }

/* --- 6. PORTFOLIO (FIXED) --- */
.portfolio-section { padding: 120px 8%; }
.section-header { text-align: center; margin-bottom: 6rem; }
.tag { color: var(--primary); text-transform: uppercase; letter-spacing: 4px; font-weight: 700; font-size: 0.75rem; display: block; margin-bottom: 1rem; }
.section-title { font-size: 3.5rem; font-weight: 700; }

.portfolio-grid { display: flex; justify-content: center; }

.portfolio-card {
    background: var(--bg-card); border-radius: 30px; border: 1px solid var(--border);
    max-width: 500px; overflow: hidden; transition: 0.5s;
    transform-style: preserve-3d;
    will-change: transform;
}
.portfolio-card:hover { transform: translateY(-15px); border-color: var(--primary); box-shadow: var(--shadow); }

.portfolio-preview {
    height: 220px; width: 100%; overflow: hidden; position: relative;
    background: #111; border-bottom: 1px solid var(--border);
}
.portfolio-thumb {
    width: 100%; height: 100%; object-fit: cover; object-position: top;
    transition: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.portfolio-card:hover .portfolio-thumb { transform: scale(1.15); }

.card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); display: flex; align-items: center;
    justify-content: center; opacity: 0; transition: 0.4s;
}
.view-tag { background: #fff; color: #000; padding: 0.6rem 1.2rem; border-radius: 50px; font-weight: 700; font-size: 0.8rem; }
.portfolio-card:hover .card-overlay { opacity: 1; }

.card-content { padding: 2.5rem; }
.category { color: var(--primary); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem; display: block; }
.card-content h3 { font-size: 1.8rem; margin-bottom: 1rem; }
.card-content p { color: var(--text-muted); font-size: 1rem; margin-bottom: 2rem; }
.card-link { color: #fff; text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-link i { color: var(--primary); transition: 0.3s; }
.card-link:hover i { transform: translateX(10px); }

/* --- 7. KONTAKT --- */
.contact-section { padding: 120px 8%; background: rgba(255,255,255,0.01); }
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; max-width: 1200px; margin: 0 auto; }
.contact-info h2 { font-size: 3.5rem; margin-bottom: 1.5rem; }
.c-item { margin-top: 1.5rem; display: flex; align-items: center; gap: 15px; color: var(--text-muted); }
.c-item i { color: var(--primary); font-size: 1.2rem; }

.contact-form { background: var(--bg-card); padding: 3rem; border-radius: 30px; border: 1px solid var(--border); }
.input-group input, .input-group textarea {
    width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
    padding: 1.2rem; border-radius: 15px; color: #fff; margin-bottom: 1.5rem; outline: none; transition: 0.3s;
}
.input-group input:focus, .input-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 15px rgba(99, 102, 241, 0.2); }

/* --- 8. FOOTER --- */
.footer { padding: 4rem 8% 2rem; border-top: 1px solid var(--border); margin-top: 50px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; color: #666; font-size: 0.9rem; }
.social-links a { color: #fff; margin-left: 1.5rem; font-size: 1.2rem; transition: 0.3s; }
.social-links a:hover { color: var(--primary); transform: translateY(-5px); display: inline-block; }

/* --- INFINITE MARQUEE --- */
.marquee-section {
    background: var(--primary);
    padding: 1.5rem 0;
    overflow: hidden;
    position: relative;
    transform: rotate(-2deg) scale(1.05); /* Blago iskošen dizajn za wow efekat */
    margin: 4rem 0;
    z-index: 10;
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: scroll-marquee 20s linear infinite;
}

.marquee-content span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 2rem;
    letter-spacing: 2px;
}

.marquee-content .star {
    color: #000;
}

@keyframes scroll-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Pomera se za 50% jer imamo dupli tekst */
}

/* --- USLUGE (SERVICES) --- */
.services-section {
    padding: 100px 8%;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px); /* Glassmorphism efekat */
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- PROCES RADA --- */
.process-section {
    padding: 100px 8%;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.03), transparent);
}

.process-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Tanka linija koja povezuje korake (vidljiva samo na većim ekranima) */
@media (min-width: 900px) {
    .process-container::before {
        content: '';
        position: absolute;
        top: 35px; left: 50px; right: 50px;
        height: 1px;
        background: var(--border);
        z-index: 0;
    }
}

.process-step {
    position: relative;
    z-index: 1;
    padding: 10px;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    display: inline-block;
    background: var(--bg-dark); /* Sakriva liniju iza broja */
    padding-right: 20px;
    transition: 0.3s;
}

.process-step:hover .step-number {
    -webkit-text-stroke: 1px var(--primary);
    color: rgba(99, 102, 241, 0.1);
}

.process-step h3 { font-size: 1.5rem; margin-bottom: 1rem; color: #fff; }
.process-step p { color: var(--text-muted); font-size: 0.95rem; }

/* --- TECH STACK --- */
.tech-stack-section {
    padding: 80px 8%;
    text-align: center;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 130px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: 0.4s;
    cursor: default;
}

.tech-item i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    transition: 0.4s;
}

.tech-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    transition: 0.4s;
}

.tech-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.15);
}

.tech-item:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

.tech-item:hover span { color: #fff; }

/* --- TOOLTIP EFEKAT ZA ALATE --- */
.tech-item {
    position: relative; /* Ovo je jako bitno da bi tooltip stajao iznad ikonice */
}

.tech-item::after {
    content: attr(data-tooltip); /* Uzima tekst iz HTML-a */
    position: absolute;
    bottom: 120%; /* Pozicionira ga iznad kartice */
    left: 50%;
    transform: translateX(-50%) translateY(15px) scale(0.95);
    background: rgba(15, 15, 15, 0.85); /* Tamna, blago providna pozadina */
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent); /* Ljubičasti okvir */
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    width: max-content;
    max-width: 200px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.tech-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    color: #fff;
}


/* --- 9. RESPONSIVE --- */
@media (max-width: 900px) {
    .navbar { padding: 1rem 0; }
    .nav-links { display: none; }
    .contact-container { grid-template-columns: 1fr; }
    .hero { text-align: center; }
    .hero-subtitle { margin: 1.5rem auto 3rem; }
    .section-title, .contact-info h2 { font-size: 2.5rem; }
}